package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class UserDefinedTypeOptionList {

    private int beginIndex;
    private int endIndex;
    private List<UserDefinedTypeOption> userDefinedTypeOptionList;

    public UserDefinedTypeOptionList(List<UserDefinedTypeOption> userDefinedTypeOptionList) {
        this.beginIndex = userDefinedTypeOptionList.get(0).getBeginIndex();
        this.endIndex = userDefinedTypeOptionList.get(userDefinedTypeOptionList.size() - 1).getEndIndex();
        this.userDefinedTypeOptionList = userDefinedTypeOptionList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return userDefinedTypeOptionList.size();
    }

    public UserDefinedTypeOption get(int index) {
        return userDefinedTypeOptionList.get(index);
    }

}
